﻿ 

namespace CarTrackr.Business.Validation 
{
 
    public abstract class Rule
    {
      
        public string PropertyName { get;  set; }
     
        public abstract string Text { get; }

        public string RuleKey
        {
            get 
            {
                return PropertyName + "-" + Type;
            }
        }

        public abstract RuleType Type { get; }

        public abstract bool Validate(string value);

    }
}
